import Vue from 'vue'
import VueRouter from 'vue-router'
import Layout from '../views/layout.vue'
import Detail from '../views/article-detail.vue'
import User from '../views/user.vue'
import Collect from '../views/collect.vue'
import Like from '../views/like.vue'
import Article from '../views/article.vue'
Vue.use(VueRouter)

const router = new VueRouter({
  routes: [
    {
      path: '/',
      component: Layout,
      children: [
        {
          path: 'article',
          component: Article,
        },
        {
          path: 'like',
          component: Like,
        },
        {
          path: 'user',
          component: User,
        },
        {
          path: 'collect',
      component:Collect
        }
      ],
    },
    {
      path: '/detail/:id',
      component: Detail,
    },
  ],
})

export default router
